str_a = "hello"
list_a = ["jack", "tom", "mary"]
tuple_a = ("yu", "tim")
set_a = {"red", "black"}
dict_a = {"0001": "小倩", "0002": "黑山老妖"}

# 转成list
print(f"str_a转成list: {list(str_a)}")  # ['h', 'e', 'l', 'l', 'o']
print(f"tuple_a转成list: {list(tuple_a)}") # ['yu', 'tim']
print(f"set_a转成list: {list(set_a)}") # ['red', 'black']
print(f"dict_a转成list: {list(dict_a)}") # ['0001', '0002']

print("=========================================================================")
# 转成str
print(f"list_a转成str: {str(list_a)}")
print(f"tuple_a转成str: {str(tuple_a)}")
print(f"set_a转成str: {str(set_a)}")
print(f"dict_a转成str: {str(dict_a)}")

print("=========================================================================")
# 转成tuple
print(f"list_a转成tuple: {tuple(list_a)}")
print(f"set_a转成tuple: {tuple(set_a)}")
print(f"dict_a转成tuple: {tuple(dict_a)}")
print(f"str_a转成tuple: {tuple(str_a)}")

print("=========================================================================")
# 转成set
print(f"list_a转成set: {set(list_a)}")
print(f"tuple_a转成set: {set(tuple_a)}")
print(f"dict_a转成set: {set(dict_a)}")
print(f"str_a转成set: {set(str_a)}")

